<script type="text/html" template lay-done="layui.data.done(d);">
    <table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsPrinter-detailsForm" id="LAY-app-CoreCmsPrinter-detailsForm">
        <colgroup>
            <col width="200">
            <col>
        </colgroup>
        <tbody>

            <tr>
                <td>
                    <label for="id">序列</label>
                </td>
                <td>
                    {{ d.params.data.model.id || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="name">应用名称</label>
                </td>
                <td>
                    {{ d.params.data.model.name || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="code">应用编码</label>
                </td>
                <td>
                    {{ d.params.data.model.code || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="clientId">易联云应用id</label>
                </td>
                <td>
                    {{ d.params.data.model.clientId || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="clientSecret">易联云应用密钥</label>
                </td>
                <td>
                    {{ d.params.data.model.clientSecret || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="machineCode">易联云终端号</label>
                </td>
                <td>
                    {{ d.params.data.model.machineCode || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="msign">易联云终端密钥</label>
                </td>
                <td>
                    {{ d.params.data.model.msign || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="printerName">打印机名称</label>
                </td>
                <td>
                    {{ d.params.data.model.printerName || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="phone">联系电话</label>
                </td>
                <td>
                    {{ d.params.data.model.phone || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="accessToken">访问令牌，API调用时需要，令牌可以重复使用无失效时间，请开发者全局保存</label>
                </td>
                <td>
                    {{ d.params.data.model.accessToken || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="refreshToken">更新access_token所需，有效时间35天</label>
                </td>
                <td>
                    {{ d.params.data.model.refreshToken || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="expiresIn">令牌的有效时间，单位秒 (30天),注：该模式下可忽略此参数</label>
                </td>
                <td>
                    {{ d.params.data.model.expiresIn || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="expiressEndTime">有效期截止时间</label>
                </td>
                <td>
                    {{ d.params.data.model.expiressEndTime || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="parameters">其他参数</label>
                </td>
                <td>
                    {{ d.params.data.model.parameters || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="createTime">创建时间</label>
                </td>
                <td>
                    {{ d.params.data.model.createTime || '' }}
                </td>
            </tr>

            <tr>
                <td>
                    <label for="isDefault">是否默认</label>
                </td>
                <td>
                    <input type="checkbox" disabled name="isDefault" value="{{d.params.data.model.isDefault}}" lay-skin="switch" lay-text="开启|关闭" lay-filter="isDefault" {{ d.params.data.model.isDefault ? 'checked' : '' }}>
                </td>
            </tr>

            <tr>
                <td>
                    <label for="isOpen">是否开启</label>
                </td>
                <td>
                    <input type="checkbox" disabled name="isOpen" value="{{d.params.data.model.isOpen}}" lay-skin="switch" lay-text="开启|关闭" lay-filter="isOpen" {{ d.params.data.model.isOpen ? 'checked' : '' }}>
                </td>
            </tr>

            <tr>
                <td>
                    <label for="storeId">绑定门店</label>
                </td>
                <td>
                    {{ d.params.data.model.storeId || '' }}
                </td>
            </tr>

        </tbody>
    </table>
</script>
<script>
    var debug = layui.setter.debug;
    layui.data.done = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }

        layui.use(['admin', 'form', 'coreHelper'], function () {
            var $ = layui.$
                , setter = layui.setter
                , admin = layui.admin
                , coreHelper = layui.coreHelper
                , form = layui.form;
            form.render(null, 'LAY-app-CoreCmsPrinter-detailsForm');
        });
    };
</script>